#!/usr/bin/python3
from typing import Dict

from indicators import *

calMap: Dict[str, Indicator] = {}


def InitCal():
    """"""
    calMap['MaVol'] = MaVol()
    calMap['MaCd'] = MaCd()
    calMap['ArBr'] = ArBr()
    calMap['Rsi'] = RSI()


def CalIndicator(name: str, data: pd.DataFrame) -> pd.Series:
    """"""
    cal = calMap.get(name)
    if cal is None:
        """"""
        print("Find none such:", name)
        return None
    return cal.cal(data)
